
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
<html><head><title>Python: package jetson.utils</title>
<meta charset="utf-8">
</head><body bgcolor="#f0f0f8">

<table width="100%" cellspacing=0 cellpadding=2 border=0 summary="heading">
<tr bgcolor="#7799ee">
<td valign=bottom>&nbsp;<br>
<font color="#ffffff" face="helvetica, arial">&nbsp;<br><big><big><strong><a href="jetson.html"><font color="#ffffff">jetson</font></a>.utils</strong></big></big></font></td
><td align=right valign=bottom
><font color="#ffffff" face="helvetica, arial"><a href=".">index</a><br><a href="file:/usr/lib/python2.7/dist-packages/jetson/utils/__init__.py">/usr/lib/python2.7/dist-packages/jetson/utils/__init__.py</a></font></td></tr></table>
    <p></p>
<p>
<table width="100%" cellspacing=0 cellpadding=2 border=0 summary="section">
<tr bgcolor="#aa55cc">
<td colspan=3 valign=bottom>&nbsp;<br>
<font color="#ffffff" face="helvetica, arial"><big><strong>Package Contents</strong></big></font></td></tr>
    
<tr><td bgcolor="#aa55cc"><tt>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</tt></td><td>&nbsp;</td>
<td width="100%"><table width="100%" summary="list"><tr><td width="25%" valign=top></td><td width="25%" valign=top></td><td width="25%" valign=top></td><td width="25%" valign=top></td></tr></table></td></tr></table><p>
<table width="100%" cellspacing=0 cellpadding=2 border=0 summary="section">
<tr bgcolor="#ee77aa">
<td colspan=3 valign=bottom>&nbsp;<br>
<font color="#ffffff" face="helvetica, arial"><big><strong>Classes</strong></big></font></td></tr>
    
<tr><td bgcolor="#ee77aa"><tt>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</tt></td><td>&nbsp;</td>
<td width="100%"><dl>
<dt><font face="helvetica, arial"><a href="__builtin__.html#object">__builtin__.object</a>
</font></dt><dd>
<dl>
<dt><font face="helvetica, arial"><a href="jetson.utils.html#cudaFont">cudaFont</a>
</font></dt><dt><font face="helvetica, arial"><a href="jetson.utils.html#glDisplay">glDisplay</a>
</font></dt><dt><font face="helvetica, arial"><a href="jetson.utils.html#gstCamera">gstCamera</a>
</font></dt></dl>
</dd>
</dl>
 <p>
<table width="100%" cellspacing=0 cellpadding=2 border=0 summary="section">
<tr bgcolor="#ffc8d8">
<td colspan=3 valign=bottom>&nbsp;<br>
<font color="#000000" face="helvetica, arial"><a name="cudaFont">class <strong>cudaFont</strong></a>(<a href="__builtin__.html#object">__builtin__.object</a>)</font></td></tr>
    
<tr bgcolor="#ffc8d8"><td rowspan=2><tt>&nbsp;&nbsp;&nbsp;</tt></td>
<td colspan=2><tt>Bitmap&nbsp;font&nbsp;overlay&nbsp;rendering&nbsp;with&nbsp;CUDA<br>&nbsp;</tt></td></tr>
<tr><td>&nbsp;</td>
<td width="100%">Methods defined here:<br>
<dl><dt><a name="cudaFont-OverlayText"><strong>OverlayText</strong></a>(...)</dt><dd><tt>Render&nbsp;the&nbsp;font&nbsp;overlay&nbsp;for&nbsp;a&nbsp;given&nbsp;text&nbsp;string</tt></dd></dl>

<dl><dt><a name="cudaFont-__init__"><strong>__init__</strong></a>(...)</dt><dd><tt>x.<a href="#cudaFont-__init__">__init__</a>(...)&nbsp;initializes&nbsp;x;&nbsp;see&nbsp;help(type(x))&nbsp;for&nbsp;signature</tt></dd></dl>

<hr>
Data descriptors defined here:<br>
<dl><dt><strong>Black</strong></dt>
<dd><tt>Black&nbsp;color&nbsp;tuple</tt></dd>
</dl>
<dl><dt><strong>Blue</strong></dt>
<dd><tt>Blue&nbsp;color&nbsp;tuple</tt></dd>
</dl>
<dl><dt><strong>Brown</strong></dt>
<dd><tt>Brown&nbsp;color&nbsp;tuple</tt></dd>
</dl>
<dl><dt><strong>Cyan</strong></dt>
<dd><tt>Cyan&nbsp;color&nbsp;tuple</tt></dd>
</dl>
<dl><dt><strong>Gray</strong></dt>
<dd><tt>Gray&nbsp;color&nbsp;tuple</tt></dd>
</dl>
<dl><dt><strong>Gray10</strong></dt>
<dd><tt>Gray&nbsp;color&nbsp;tuple&nbsp;(10%&nbsp;alpha)</tt></dd>
</dl>
<dl><dt><strong>Gray20</strong></dt>
<dd><tt>Gray&nbsp;color&nbsp;tuple&nbsp;(20%&nbsp;alpha)</tt></dd>
</dl>
<dl><dt><strong>Gray30</strong></dt>
<dd><tt>Gray&nbsp;color&nbsp;tuple&nbsp;(30%&nbsp;alpha)</tt></dd>
</dl>
<dl><dt><strong>Gray40</strong></dt>
<dd><tt>Gray&nbsp;color&nbsp;tuple&nbsp;(40%&nbsp;alpha)</tt></dd>
</dl>
<dl><dt><strong>Gray50</strong></dt>
<dd><tt>Gray&nbsp;color&nbsp;tuple&nbsp;(50%&nbsp;alpha)</tt></dd>
</dl>
<dl><dt><strong>Gray60</strong></dt>
<dd><tt>Gray&nbsp;color&nbsp;tuple&nbsp;(60%&nbsp;alpha)</tt></dd>
</dl>
<dl><dt><strong>Gray70</strong></dt>
<dd><tt>Gray&nbsp;color&nbsp;tuple&nbsp;(70%&nbsp;alpha)</tt></dd>
</dl>
<dl><dt><strong>Gray80</strong></dt>
<dd><tt>Gray&nbsp;color&nbsp;tuple&nbsp;(80%&nbsp;alpha)</tt></dd>
</dl>
<dl><dt><strong>Gray90</strong></dt>
<dd><tt>Gray&nbsp;color&nbsp;tuple&nbsp;(90%&nbsp;alpha)</tt></dd>
</dl>
<dl><dt><strong>Green</strong></dt>
<dd><tt>Green&nbsp;color&nbsp;tuple</tt></dd>
</dl>
<dl><dt><strong>Lime</strong></dt>
<dd><tt>Lime&nbsp;color&nbsp;tuple</tt></dd>
</dl>
<dl><dt><strong>Magenta</strong></dt>
<dd><tt>Magenta&nbsp;color&nbsp;tuple</tt></dd>
</dl>
<dl><dt><strong>Orange</strong></dt>
<dd><tt>Orange&nbsp;color&nbsp;tuple</tt></dd>
</dl>
<dl><dt><strong>Purple</strong></dt>
<dd><tt>Purple&nbsp;color&nbsp;tuple</tt></dd>
</dl>
<dl><dt><strong>Red</strong></dt>
<dd><tt>Red&nbsp;color&nbsp;tuple</tt></dd>
</dl>
<dl><dt><strong>Tan</strong></dt>
<dd><tt>Tan&nbsp;color&nbsp;tuple</tt></dd>
</dl>
<dl><dt><strong>White</strong></dt>
<dd><tt>White&nbsp;color&nbsp;tuple</tt></dd>
</dl>
<dl><dt><strong>Yellow</strong></dt>
<dd><tt>Yellow&nbsp;color&nbsp;tuple</tt></dd>
</dl>
<hr>
Data and other attributes defined here:<br>
<dl><dt><strong>__new__</strong> = &lt;built-in method __new__ of type object&gt;<dd><tt>T.<a href="#cudaFont-__new__">__new__</a>(S,&nbsp;...)&nbsp;-&gt;&nbsp;a&nbsp;new&nbsp;<a href="__builtin__.html#object">object</a>&nbsp;with&nbsp;type&nbsp;S,&nbsp;a&nbsp;subtype&nbsp;of&nbsp;T</tt></dl>

</td></tr></table> <p>
<table width="100%" cellspacing=0 cellpadding=2 border=0 summary="section">
<tr bgcolor="#ffc8d8">
<td colspan=3 valign=bottom>&nbsp;<br>
<font color="#000000" face="helvetica, arial"><a name="glDisplay">class <strong>glDisplay</strong></a>(<a href="__builtin__.html#object">__builtin__.object</a>)</font></td></tr>
    
<tr bgcolor="#ffc8d8"><td rowspan=2><tt>&nbsp;&nbsp;&nbsp;</tt></td>
<td colspan=2><tt>OpenGL&nbsp;display&nbsp;window<br>&nbsp;</tt></td></tr>
<tr><td>&nbsp;</td>
<td width="100%">Methods defined here:<br>
<dl><dt><a name="glDisplay-BeginRender"><strong>BeginRender</strong></a>(...)</dt><dd><tt>Clear&nbsp;window&nbsp;and&nbsp;begin&nbsp;rendering&nbsp;a&nbsp;frame</tt></dd></dl>

<dl><dt><a name="glDisplay-EndRender"><strong>EndRender</strong></a>(...)</dt><dd><tt>Finish&nbsp;rendering&nbsp;and&nbsp;refresh&nbsp;/&nbsp;flip&nbsp;the&nbsp;backbuffer</tt></dd></dl>

<dl><dt><a name="glDisplay-GetFPS"><strong>GetFPS</strong></a>(...)</dt><dd><tt>Return&nbsp;the&nbsp;average&nbsp;frame&nbsp;time&nbsp;(in&nbsp;milliseconds)</tt></dd></dl>

<dl><dt><a name="glDisplay-GetHeight"><strong>GetHeight</strong></a>(...)</dt><dd><tt>Return&nbsp;the&nbsp;height&nbsp;of&nbsp;the&nbsp;window&nbsp;(in&nbsp;pixels)</tt></dd></dl>

<dl><dt><a name="glDisplay-GetWidth"><strong>GetWidth</strong></a>(...)</dt><dd><tt>Return&nbsp;the&nbsp;width&nbsp;of&nbsp;the&nbsp;window&nbsp;(in&nbsp;pixels)</tt></dd></dl>

<dl><dt><a name="glDisplay-IsClosed"><strong>IsClosed</strong></a>(...)</dt><dd><tt>Returns&nbsp;true&nbsp;if&nbsp;the&nbsp;window&nbsp;has&nbsp;been&nbsp;closed</tt></dd></dl>

<dl><dt><a name="glDisplay-IsOpen"><strong>IsOpen</strong></a>(...)</dt><dd><tt>Returns&nbsp;true&nbsp;if&nbsp;the&nbsp;window&nbsp;is&nbsp;open</tt></dd></dl>

<dl><dt><a name="glDisplay-Render"><strong>Render</strong></a>(...)</dt><dd><tt>Render&nbsp;a&nbsp;CUDA&nbsp;float4&nbsp;image&nbsp;using&nbsp;OpenGL&nbsp;interop</tt></dd></dl>

<dl><dt><a name="glDisplay-RenderOnce"><strong>RenderOnce</strong></a>(...)</dt><dd><tt>Begin&nbsp;the&nbsp;frame,&nbsp;render&nbsp;a&nbsp;CUDA&nbsp;float4&nbsp;image&nbsp;using&nbsp;OpenGL&nbsp;interop,&nbsp;and&nbsp;then&nbsp;end&nbsp;the&nbsp;frame</tt></dd></dl>

<dl><dt><a name="glDisplay-SetBackgroundColor"><strong>SetBackgroundColor</strong></a>(...)</dt><dd><tt>Set&nbsp;the&nbsp;window&nbsp;background&nbsp;color</tt></dd></dl>

<dl><dt><a name="glDisplay-SetTitle"><strong>SetTitle</strong></a>(...)</dt><dd><tt>Set&nbsp;the&nbsp;window&nbsp;title&nbsp;string</tt></dd></dl>

<dl><dt><a name="glDisplay-UserEvents"><strong>UserEvents</strong></a>(...)</dt><dd><tt>Process&nbsp;UI&nbsp;events</tt></dd></dl>

<dl><dt><a name="glDisplay-__init__"><strong>__init__</strong></a>(...)</dt><dd><tt>x.<a href="#glDisplay-__init__">__init__</a>(...)&nbsp;initializes&nbsp;x;&nbsp;see&nbsp;help(type(x))&nbsp;for&nbsp;signature</tt></dd></dl>

<hr>
Data and other attributes defined here:<br>
<dl><dt><strong>__new__</strong> = &lt;built-in method __new__ of type object&gt;<dd><tt>T.<a href="#glDisplay-__new__">__new__</a>(S,&nbsp;...)&nbsp;-&gt;&nbsp;a&nbsp;new&nbsp;<a href="__builtin__.html#object">object</a>&nbsp;with&nbsp;type&nbsp;S,&nbsp;a&nbsp;subtype&nbsp;of&nbsp;T</tt></dl>

</td></tr></table> <p>
<table width="100%" cellspacing=0 cellpadding=2 border=0 summary="section">
<tr bgcolor="#ffc8d8">
<td colspan=3 valign=bottom>&nbsp;<br>
<font color="#000000" face="helvetica, arial"><a name="gstCamera">class <strong>gstCamera</strong></a>(<a href="__builtin__.html#object">__builtin__.object</a>)</font></td></tr>
    
<tr bgcolor="#ffc8d8"><td rowspan=2><tt>&nbsp;&nbsp;&nbsp;</tt></td>
<td colspan=2><tt>MIPI&nbsp;CSI&nbsp;or&nbsp;USB&nbsp;camera&nbsp;using&nbsp;GStreamer<br>&nbsp;</tt></td></tr>
<tr><td>&nbsp;</td>
<td width="100%">Methods defined here:<br>
<dl><dt><a name="gstCamera-CaptureRGBA"><strong>CaptureRGBA</strong></a>(...)</dt><dd><tt>Capture&nbsp;a&nbsp;camera&nbsp;frame&nbsp;and&nbsp;convert&nbsp;it&nbsp;to&nbsp;float4&nbsp;RGBA</tt></dd></dl>

<dl><dt><a name="gstCamera-Close"><strong>Close</strong></a>(...)</dt><dd><tt>Stop&nbsp;streaming&nbsp;camera&nbsp;frames</tt></dd></dl>

<dl><dt><a name="gstCamera-GetHeight"><strong>GetHeight</strong></a>(...)</dt><dd><tt>Return&nbsp;the&nbsp;height&nbsp;of&nbsp;the&nbsp;camera&nbsp;(in&nbsp;pixels)</tt></dd></dl>

<dl><dt><a name="gstCamera-GetWidth"><strong>GetWidth</strong></a>(...)</dt><dd><tt>Return&nbsp;the&nbsp;width&nbsp;of&nbsp;the&nbsp;camera&nbsp;(in&nbsp;pixels)</tt></dd></dl>

<dl><dt><a name="gstCamera-Open"><strong>Open</strong></a>(...)</dt><dd><tt>Open&nbsp;the&nbsp;camera&nbsp;for&nbsp;streaming&nbsp;frames</tt></dd></dl>

<dl><dt><a name="gstCamera-__init__"><strong>__init__</strong></a>(...)</dt><dd><tt>x.<a href="#gstCamera-__init__">__init__</a>(...)&nbsp;initializes&nbsp;x;&nbsp;see&nbsp;help(type(x))&nbsp;for&nbsp;signature</tt></dd></dl>

<hr>
Data and other attributes defined here:<br>
<dl><dt><strong>__new__</strong> = &lt;built-in method __new__ of type object&gt;<dd><tt>T.<a href="#gstCamera-__new__">__new__</a>(S,&nbsp;...)&nbsp;-&gt;&nbsp;a&nbsp;new&nbsp;<a href="__builtin__.html#object">object</a>&nbsp;with&nbsp;type&nbsp;S,&nbsp;a&nbsp;subtype&nbsp;of&nbsp;T</tt></dl>

</td></tr></table></td></tr></table><p>
<table width="100%" cellspacing=0 cellpadding=2 border=0 summary="section">
<tr bgcolor="#eeaa77">
<td colspan=3 valign=bottom>&nbsp;<br>
<font color="#ffffff" face="helvetica, arial"><big><strong>Functions</strong></big></font></td></tr>
    
<tr><td bgcolor="#eeaa77"><tt>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</tt></td><td>&nbsp;</td>
<td width="100%"><dl><dt><a name="-adaptFontSize"><strong>adaptFontSize</strong></a>(...)</dt><dd><tt>Determine&nbsp;an&nbsp;appropriate&nbsp;font&nbsp;size&nbsp;for&nbsp;the&nbsp;given&nbsp;image&nbsp;dimension</tt></dd></dl>
 <dl><dt><a name="-cudaAllocMapped"><strong>cudaAllocMapped</strong></a>(...)</dt><dd><tt>Allocate&nbsp;CUDA&nbsp;ZeroCopy&nbsp;mapped&nbsp;memory</tt></dd></dl>
 <dl><dt><a name="-cudaDeviceSynchronize"><strong>cudaDeviceSynchronize</strong></a>(...)</dt><dd><tt>Wait&nbsp;for&nbsp;the&nbsp;GPU&nbsp;to&nbsp;complete&nbsp;all&nbsp;work</tt></dd></dl>
 <dl><dt><a name="-cudaFromNumpy"><strong>cudaFromNumpy</strong></a>(...)</dt><dd><tt>Copy&nbsp;a&nbsp;numpy&nbsp;ndarray&nbsp;to&nbsp;CUDA&nbsp;memory</tt></dd></dl>
 <dl><dt><a name="-cudaMalloc"><strong>cudaMalloc</strong></a>(...)</dt><dd><tt>Allocated&nbsp;CUDA&nbsp;memory&nbsp;on&nbsp;the&nbsp;GPU&nbsp;with&nbsp;<a href="#-cudaMalloc">cudaMalloc</a>()</tt></dd></dl>
 <dl><dt><a name="-cudaToNumpy"><strong>cudaToNumpy</strong></a>(...)</dt><dd><tt>Create&nbsp;a&nbsp;numpy&nbsp;ndarray&nbsp;wrapping&nbsp;the&nbsp;CUDA&nbsp;memory,&nbsp;without&nbsp;copying&nbsp;it</tt></dd></dl>
 <dl><dt><a name="-loadImageRGBA"><strong>loadImageRGBA</strong></a>(...)</dt><dd><tt>Load&nbsp;an&nbsp;image&nbsp;from&nbsp;disk&nbsp;into&nbsp;GPU&nbsp;memory&nbsp;as&nbsp;float4&nbsp;RGBA</tt></dd></dl>
 <dl><dt><a name="-saveImageRGBA"><strong>saveImageRGBA</strong></a>(...)</dt><dd><tt>Save&nbsp;a&nbsp;float4&nbsp;RGBA&nbsp;image&nbsp;to&nbsp;disk</tt></dd></dl>
</td></tr></table><p>
<table width="100%" cellspacing=0 cellpadding=2 border=0 summary="section">
<tr bgcolor="#55aa55">
<td colspan=3 valign=bottom>&nbsp;<br>
<font color="#ffffff" face="helvetica, arial"><big><strong>Data</strong></big></font></td></tr>
    
<tr><td bgcolor="#55aa55"><tt>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</tt></td><td>&nbsp;</td>
<td width="100%"><strong>VERSION</strong> = '1.0.0'</td></tr></table>
</body></html>